package com.team.employment.common.minio;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Configuration
@EnableConfigurationProperties(MinioProperties.class)   //第一种注册方式
//@ConfigurationPropertiesScan("com.cye.lease.common.minio") //第二种注册方式
public class MinioConfiguration {

//    //第一种映射
////    @Value("endpoint")
////    private String endpoint;
//
//    //第二种映射
//    @Autowired
//    private MinioProperties minioProperties;
//
//    @Bean
//    public MinioClient minioClient() {
//       return MinioClient.builder().endpoint(minioProperties.getEndpoint()).credentials(minioProperties.getAccessKey(),minioProperties.getSecretKey()).build();
//    }
}
